package com.zhongkun.datahome.common.enums;

import lombok.Getter;

import java.util.Arrays;

/**
 * @Author: lifengsheng
 * @Date: 2025/5/22 10:20
 * @Desc
 */
@Getter
public enum TenantUserStatusEnum {
    ENABLE(0, "启用"),
    DISABLE(1, "禁用");

    private Integer status;
    private String name;

    TenantUserStatusEnum(Integer status, String name) {
        this.status = status;
        this.name = name;
    }

    public boolean is(Integer status) {
        return this.status.equals(status);
    }

    public static boolean isValid(Integer status) {
        return Arrays.stream(TenantUserStatusEnum.values()).anyMatch(e -> e.is(status));
    }
}
